import django
django.setup()

from collectcookiee.celery import app
from cookie.models import Tasks
from collectcookiee.scripts import gevent_start


@app.task
def csdn_script():
    task = Tasks.objects.filter(status='0').order_by('release_time').first()
    if task is None:
        pass
    else:
        print(task.article_url)
        gevent_start(task.article_url)
        task.status = '1'
        task.save()
        print(1)




    